#ifndef _PARA_TABLE_
#define _PARA_TABLE_

#include "../common_typedef.h"

class ParaTable
{
public:
    ERRCODE InitFromRom(const uint8_t* data, uint32_t len);

private:
    typedef struct G3UMD32ChannelPara
    {
        uint8_t chIdx;
        uint8_t remapOutput;
        uint8_t remapCurrMeasure;
        uint8_t remapVoltMeasure;
        float dacCalib[2];
        float voltCalib[2];
        float currP00, currP10, currP01;
    } G3UMD32ChannelPara;

    typedef struct G3UMD32ParaFile
    {
        char fileTitle[8];
        uint32_t paraVer;
        char signature[16];
        uint32_t dataLen;
        uint32_t boardID;
        uint8_t reserved1[32];
        G3UMD32ChannelPara ch[G3UMD32_CHANNEL_CNT];
        uint32_t crc;
    } G3UMD32ParaFile;
    G3UMD32ParaFile m_paraFile;
};

#endif